package com.example.studentportrait.controller.frontend.teacher;

import com.example.studentportrait.domain.ResponseResult;
import com.example.studentportrait.domain.dto.SpecialStudentDto;
import com.example.studentportrait.service.SpecialStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

//成绩 访谈 更新
@RestController
@RequestMapping("/specialStudent")
public class SpecialStudentController {
    @Autowired
    private  SpecialStudentService specialStudentService;

    /**
     * 获取学生列表
     * @param page
     * @param size
     * @param specialStudentDto
     * @return
     */
    @GetMapping("/specialStudentList")
    public ResponseResult specialStudentList(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int size, @RequestBody SpecialStudentDto specialStudentDto) {
        return specialStudentService.specialStudentList(page,size,specialStudentDto);
    }

    /**
     * 更新学生信息
     * @param specialStudentDto
     * @return
     */
    @PutMapping("updateSpecialStudent")
    public ResponseResult<SpecialStudentDto> updateSpecialStudent(@RequestBody SpecialStudentDto specialStudentDto){
        return specialStudentService.updateSpecialStudent(specialStudentDto);
    }

//    @GetMapping("/specialStudentGrade")
//    public ResponseResult destinationList(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int size, @RequestBody GraduationDestinationDto graduationDestinationDto) {
//        return graduationDestinationService.graduationDestinationList(page,size,graduationDestinationDto);
//    }

    /**
     * 获取学生成绩
     * @param account
     * @return
     */
    @GetMapping("/gradeStatistics")
    public ResponseResult gradeStatistics(@RequestParam String account) {
        return specialStudentService.gradeStatistics(account);
    }

    /**
     * 获取学生访谈记录
     * @param account
     * @return
     */
    @GetMapping("/interviewRecord")
    public ResponseResult interviewRecord(@RequestParam String account) {
        return specialStudentService.interviewRecord(account);
    }
}
